<?php defined('TSTP_PACKAGE') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Test_Types
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: instanceof.tstp.php5 247 2009-05-24 14:44:47Z molotsoft@gmail.com $
* @link $HeadURL: http://test-types.googlecode.com/svn/tags/2.0.3/types/object/instanceof.tstp.php5 $
*/


function tstp_instanceof($var, $class_name = NULL) {
	//return is_object($var) && (!is_null($class_name) ? is_a($var, trim($class_name)) : TRUE); // php 4 >= 4.2.0
	return is_object($var) && (!is_null($class_name) ? ($var instanceof $class_name) : TRUE); // php 5
}

function tstp_instance($var, $class_name = NULL) { return tstp_instanceof($var, $class_name); }
function tstp_inst($var, $class_name = NULL) { return tstp_instanceof($var, $class_name); }


?>